#!/bin/bash

#登录docker
docker login -u dhy -p 126433zdh 43.142.147.49:85

#进入项目根目录下
cd /var/lib/jenkins/workspace/SpringCloudBook/Code

#通过命令文件启动项目
cd sms
# docker push 43.142.147.49:85/springcloudbook/REPOSITORY[:TAG]
docker rm -f 43.142.147.49:85/springcloudbook/sms:1.0
docker build -t 43.142.147.49:85/springcloudbook/sms:1.0 .
docker push 43.142.147.49:85/springcloudbook/sms:1.0
cd ..

cd rbac
# docker push 43.142.147.49:85/springcloudbook/REPOSITORY[:TAG]
docker rm -f 43.142.147.49:85/springcloudbook/rbac:1.0
docker build -t 43.142.147.49:85/springcloudbook/rbac:1.0 .
docker push 43.142.147.49:85/springcloudbook/rbac:1.0
cd ..

cd eureka
# docker push 43.142.147.49:85/springcloudbook/REPOSITORY[:TAG]
docker rm -f 43.142.147.49:85/springcloudbook/eureka:1.0
docker build -t 43.142.147.49:85/springcloudbook/eureka:1.0 .
docker push 43.142.147.49:85/springcloudbook/eureka:1.0
cd ..


